# -- Pulling in necessary data files -- #
## Read in length/weight data
#ml_wt_22 <- read.csv('ml_wt_21_22.csv')
## Read in NAFO shelfbreak shapefiles
wd = here::here("shapefiles")
nafo <- rgdal::readOGR(wd,'NAFO_SHELFBREAK', verbose = FALSE) # wd = working directory
proj4string(nafo) <- CRS("+init=epsg:4326")
## Read in bathymetry
atl <- marmap::getNOAA.bathy(-80,-64, 33, 45.5)
atl = fortify.bathy(atl)
# Set colors for maps
blues = colorRampPalette(brewer.pal(9,'Blues'))(25)
depths <- c(0,50,100,200,300,Inf)
blues2 <- blues[c(5,7,9,11,13,24)]
## Read in coastline from mapdata
coast = map_data("world2Hires")
coast = subset(coast, region %in% c('Canada', 'USA', 'Mexico'))
coast$long = (360 - coast$long)*-1
## Read in bottom temperatures from emolt
emolt = read.csv('emolt_QCed_telemetry_and_wified.csv')
emolt <- emolt[,-1]
## Read in the ILXSM data
source('process_data.R')
ml_wt <- process_bsm_data(here("data/ilxsm/ILXSMdata_01-01-2023_06-29-2023.csv"))
# Setting current day/week for data files
current_day = today()
currentweek = lubridate::week(current_day)
first_day = as.Date('2022-04-03')
firstweek = lubridate::week(first_day)
currentweek = firstweek + 1
currentweek = currentweek + 1
Weekly updates for oceanographic indicators for the Northern Shortfin Squid, Illex illecebrosus.
This page is aimed to provide near-real-time observations of relevant oceanographic conditions in the Northwest Atlantic to aid in our understanding of the patterns of availability of Illex. This page will be updated weekly and weekly observations will be retained and accessible via the table of contents in the upper left hand corner of this page.
knitr::include_graphics(here::here(paste0("images/composites/W_202326-NES-CHLOR_A_SST-STATS_ANOMS-COMPOSITE.png")))
animation credit: Kim Hyde
# Set week
current_day = today()
currentweek = lubridate::week(current_day)
# add additional date variables
emolt$datet <- ymd_hms(emolt$datet)
emolt <- emolt %>%
mutate(year = year(datet),
month = month(datet),
week = week(datet),
day = day(datet)) %>%
as.data.frame()
# subset by current week for years of interest
ls <- list(assign(paste('e_2023', sep='_', currentweek),emolt %>%
filter(year == 2023 & week == currentweek)), assign(paste('e_2022', sep='_', currentweek),emolt %>%
filter(year == 2022 & week == currentweek)))
# set up to get min/max mean temps across years to set scale
y23 <- ls[[1]] %>%
summarise(min.temp = min(mean_temp), max.temp = max(mean_temp))
y22 <-ls[[2]] %>%
summarise(min.temp = min(na.omit(mean_temp)), max.temp = max(na.omit(mean_temp)))
mintemps <- c(y22$min.temp,y23$min.temp)
maxtemps <- c(y22$max.temp,y23$max.temp)
loc.min = which.min(mintemps)
loc.max = which.min(maxtemps)
# Plot
p1 <- ggplot() +
geom_contour_filled(data = atl,
aes(x=x,y=y,z=-1*z),
breaks=c(0,50,100,200,500,Inf),
size=c(0.3)) +
scale_fill_manual(values = blues2,
guide = 'none') +
geom_contour(data = atl,
aes(x=x,y=y,z=-1*z),
breaks=c(0,50,100,200,500,Inf),
size=c(0.3),
col = 'darkgrey') +
# NAFO subareas
geom_sf(data=nafo %>% st_as_sf(), fill = NA, colour = 'Black') +
new_scale_fill() +
# Bottom data as points
geom_point(data = ls[[1]],
aes(x = lon, y = lat, color = mean_temp),
size = 3) +
scale_color_gradient(low = "darkblue",
high = "darkred",
limits = c(min(mintemps[loc.min]),
max(maxtemps[loc.max])),
guide = 'none') +
geom_polygon(data = coast, aes(x=long, y = lat, group = group),
color = "gray20", fill = "wheat3", alpha = 0.7) +
coord_sf(xlim = c(-76,-65), ylim = c(35,45),datum = sf::st_crs(4326)) +
labs(title = paste('2023: Week', currentweek),
subtitle = 'Mean Bottom Temperature') +
xlab('Longitude') +
ylab('Latitude') +
scale_fill_discrete(guide = 'none') +
annotation_scale(location = "tl", width_hint = 0.5) +
annotation_north_arrow(location = "tl",
which_north = "true",
pad_x = unit(0.15, "in"),
pad_y = unit(0.3, "in"),
style = north_arrow_fancy_orienteering) +
theme_bw()
p2 <- ggplot() +
geom_contour_filled(data = atl,
aes(x=x,y=y,z=-1*z),
breaks=c(0,50,100,250,500,Inf),
size=c(0.3)) +
scale_fill_manual(values = blues2,
name = paste("Depth (m)"),
labels = depths,
position = 'bottom') +
geom_contour(data = atl,
aes(x=x,y=y,z=-1*z),
breaks=c(0,50,100,250,500,Inf),
size=c(0.3),
col = 'darkgrey') +
# NAFO subareas
geom_sf(data=nafo %>% st_as_sf(), fill = NA, colour = 'Black') +
new_scale_fill() +
# Bottom data as points
geom_point(data = ls[[2]],
aes(x = lon, y = lat, color = mean_temp),
size = 3) + # alpha = 0.5
scale_color_gradient(low = "darkblue",
high = "darkred",
limits = c(min(mintemps[loc.min]),
max(maxtemps[loc.max])),
name = paste('Temperature (°C)')) +
geom_polygon(data = coast, aes(x=long, y = lat, group = group),
color = "gray20", fill = "wheat3", alpha = 0.7)+
coord_sf(xlim = c(-76,-65), ylim = c(35,45),datum = sf::st_crs(4326)) +
labs(title = paste('2022: Week', currentweek),
subtitle = 'Mean Bottom Temperature') +
xlab('Longitude') +
ylab('') +
theme(legend.position = 'bottom',
legend.box = "horizontal",
legend.margin = margin()) +
theme_bw()
# p2 + theme(legend.position = c(0.85, 0.25)) +
# theme(legend.background = element_rect(linetype="solid",
# colour ="grey20")) +
# theme(legend.key.size = unit(0.5, 'cm'))
# plot
p1 | p2
knitr::include_graphics(here::here(paste0("images/jc_charts/jc_20230628.png")))
knitr::include_graphics(here::here(paste0("images/jc_charts/jc_20230626.png")))
With canyons:
knitr::include_graphics(here::here(paste0("images/jc_charts/6-26-23ClarkChart_Canyons.jpeg")))
rundate <- '202326'
knitr::include_graphics(here::here(paste0("images/study_fleet/W_",
rundate, "_QM.png")))
ml_23 <- ml_wt %>%
filter(PARAM_TYPE == 'ML') %>%
rename(length = PARAM_VALUE_NUM)
l1 = ggplot(ml_23 %>% filter(year == 2023),
aes(x = length, y = factor(week), fill = factor(week))) +
geom_density_ridges(alpha = .8, color = 'white',
scale = 2.5, rel_min_height = .01) +
labs(title = '2023 Illex Lengths', x = 'Length (mm)', y = 'Week', fill = 'Week') +
guides(color = guide_legend(title = 'Week')) +
theme_ridges() +
theme_classic()
l2 = ggplot(ml_23 %>% filter(year == 2023), aes(x = length, y = factor(week),
fill = stat(quantile))) +
stat_density_ridges(quantile_lines = FALSE,
calc_ecdf = TRUE, rel_min_height = 0.0001,
geom = "density_ridges_gradient") +
labs(title = '2023 Illex Lengths',
subtitle = 'ILXSM data',
x = 'Lengths', y = 'Week') +
scale_fill_brewer(name = '', palette = 'Greys') +
ecodata::theme_ts()
# l1 +
# l2
l1
wt_23 <- ml_wt %>%
filter(PARAM_TYPE == 'WT') %>%
rename(weight = PARAM_VALUE_NUM)
w1 = ggplot(wt_23 %>% filter(year == 2023),
aes(x = weight, y = factor(week), fill = factor(week))) +
geom_density_ridges(alpha = .8, color = 'white',
scale = 2.5, rel_min_height = .01) +
labs(title = '2023 Illex Weights', x = 'Weight (gm)', y = 'Week', fill = 'Week') +
guides(color = guide_legend(title = 'Week')) +
theme_ridges() +
theme_classic()
w2 = ggplot(wt_23 %>% filter(year == 2023), aes(x = weight, y = factor(week),
fill = stat(quantile))) +
stat_density_ridges(quantile_lines = FALSE,
calc_ecdf = TRUE, rel_min_height = 0.0001,
geom = "density_ridges_gradient") +
labs(title = '2023 Illex Weights',
subtitle = 'ILXSM data',
x = 'Weights', y = 'Week') +
scale_fill_brewer(name = '', palette = 'Greys') +
ecodata::theme_ts()
# w1 +
# w2
w1